package com.eonmind.user.utils;

import lombok.extern.slf4j.Slf4j;


import java.util.Random;

@Slf4j
public class VerificationUtils {
    // 生成随机验证码的方法
    public static String generateRandomCode(int length) {
        Random random = new Random();
        StringBuilder code = new StringBuilder();
        for (int i = 0; i < length; i++) {
            code.append(random.nextInt(10));
        }
        return code.toString();
    }
}
